Exercise Generator
07/28/24
Python
Build all possible formatted exercise strings from a Coda table containing exercise data
Retrieves exercise configurations from a Coda table through a GET request and converts the json response into a list of Exercise objects. All of the objects flagged to generate are sent back to Coda through a POST request.
Enter Exercises
To help set up data, I created a form in Coda. The variant and exercise are entered along with all of the equipment that can be used to perform the exercise. The muscle group should also be selected before submission.
Sample Data
I broke the “exercise” into equipment, variant, and root exercise. The muscle group was also included to help with grouping the data. Lastly, two flags exist to determine if the row is still under review or if the exercise should be generated.
Review Exercises
Before I mark the exercises to generate, I review the entries. Once I’ve verified the fields are correct, I flip the generate flag. The next time I run the script, it will be picked up and processed. After I’ve confirmed the output, I complete the review.
Generated Exercises
I wanted this text string generated for use in my workout programs I store in Coda. Additionally, they’ve come in handy for tracking my records and current maxes. Although the output is simple, exploring exercises and how best to structure the data in a way that supports the variety of training methods made for an interesting problem to solve.